const mongoose=require("mongoose")

let schema = new mongoose.Schema({
        category:{
            type:String,
            require:true
        },
        title:{
            type:String,
            require: true
        },
        author:{
         type:String,
         require:true
        },
        synopsis:{
            type:String,
           require:true
       },
        content:{
         type:String,
         require:true
        },
        reading:{
            type:Number,
        require:true
    }

    },
    {
        timestamps: {
            createdAt: 'created',
            updatedAt: 'updated'
        }
    }
);

let model =mongoose.model("blog",schema);
module.exports = model;